const mixinForwardTraceBackTo = {
  data() {
    return {
      outSnInfoOption: {
        height: 500,
        calcHeight: 30,
        border: true,
        index: true,
        selection: false,
        addBtn: false,
        refreshBtn: false,
        columnBtn: false,
        menu: false,
        indexLabel: '序号',
        column: [
          {
            label: '产品序列号',
            prop: 'productSn',
            width: 220
          },
          {
            label: '外部序列号',
            prop: 'sn'
          },
          {
            label: '工单号',
            prop: 'workorderNo',
            width: 150
          },
          {
            label: '状态',
            prop: 'status',
            width: 80,
            type: 'select',
            html: true,
            formatter: (val) => {
              if (val.status === 0) return `<span class="stateWords-warning">生产中</span>`;
              else if (val.status === 1) return `<span class="stateWords-success">完成</span>`;
              else if (val.status === 2) return `<span class="stateWords-primary">包装</span>`;
              else if (val.status === 3) return `<span class="stateWords-default">入库</span>`;
              else if (val.status === 4) return `<span class="stateWords-danger">报废</span>`;
              else if (val.status === 5) return `<span class="stateWords-danger">扣住</span>`;
              else if (val.status === 6) return `<span class="stateWords-success">维修</span>`;
              else if (val.status === 7) return `<span class="stateWords-success">发货</span>`;
              else if (val.status === 8) return `<span class="stateWords-warning">锁定</span>`;
              else return '';
            },
            dicData: [
              {
                label: '生产中',
                value: 0
              },
              {
                label: '完成',
                value: 1
              },
              {
                label: '包装',
                value: 2
              },
              {
                label: '入库',
                value: 3
              },
              {
                label: '已完工',
                value: 4
              },
              {
                label: '报废',
                value: 5
              },
              {
                label: '维修',
                value: 6
              },
              {
                label: '发货',
                value: 7
              },
              {
                label: '锁定',
                value: 8
              }
            ]
          },
          {
            label: '创建时间',
            prop: 'createTime',
            width: 150
          }
        ]
      },
      //工艺路线信息表格配置
      processRouteInfoOption: {
        height: 500,
        calcHeight: 30,
        border: true,
        index: true,
        selection: false,
        addBtn: false,
        refreshBtn: false,
        columnBtn: false,
        menu: false,
        indexLabel: '序号',
        column: [
          {
            label: '工站名称',
            prop: 'processRouteName'
          },
          {
            label: '工站类型',
            prop: 'processRouteType',
            dicData: [
              //可做返回类型的转换
              {
                label: '过站',
                value: 'OVERSTATION'
              },
              {
                label: '报工',
                value: 'TIMESHEET'
              },
              {
                label: '测试',
                value: 'TEST'
              },
              {
                label: '老化',
                value: 'AGING'
              },
              {
                label: '包装',
                value: 'PACKING'
              },
              {
                label: '组装',
                value: 'ASSEMBLY'
              },
              {
                label: '上料',
                value: 'FEEDING'
              }
            ]
          },
          {
            label: '是否过站',
            prop: 'isPassed'
          }
        ]
      },
      parentOption: {
        height: 500,
        calcHeight: 30,
        border: true,
        index: true,
        selection: false,
        addBtn: false,
        refreshBtn: false,
        columnBtn: false,
        menu: false,
        indexLabel: '序号',
        column: [
          {
            label: '产品序列号',
            prop: 'productSn'
          },
          {
            label: '组装父级序列号',
            prop: 'productSn'
          },
          {
            label: '产品编码',
            prop: 'productNo'
          },
          {
            label: '产品名称',
            prop: 'productName'
          },
          {
            label: '产品规格',
            prop: 'productModel'
          }
        ]
      }, //组装父级条码
      sonOption: {
        height: 500,
        calcHeight: 30,
        border: true,
        index: true,
        selection: false,
        addBtn: false,
        refreshBtn: false,
        columnBtn: false,
        menu: false,
        indexLabel: '序号',
        column: [
          {
            label: '产品序列号',
            prop: 'productSn'
          },
          {
            label: '组装子级序列号',
            prop: 'partSequenceNo'
          },
          {
            label: '产品编码',
            prop: 'productNo'
          },
          {
            label: '产品名称',
            prop: 'productName'
          },
          {
            label: '产品规格',
            prop: 'productModel'
          }
        ]
      }, //组装子级条码
      //过站信息表格配置
      passingStationInfoOption: {
        height: 500,
        calcHeight: 30,
        border: true,
        index: true,
        selection: false,
        addBtn: false,
        editBtn: false,
        delBtn: false,
        viewBtn: false,
        refreshBtn: false,
        columnBtn: false,
        indexLabel: '序号',
        menu: false,
        column: [
          {
            label: '序列号',
            prop: 'sequenceNumber'
          },
          {
            label: '产品数量',
            prop: 'quantity'
          },
          {
            label: '工单号',
            prop: 'workOrderNo'
          },
          {
            label: '工序名称',
            prop: 'processRouteName'
          },
          {
            label: '工序类型',
            prop: 'processRouteType',
            dicData: [
              //可做返回类型的转换
              {
                label: '过站',
                value: 'OVERSTATION'
              },
              {
                label: '报工',
                value: 'TIMESHEET'
              },
              {
                label: '测试',
                value: 'TEST'
              },
              {
                label: '老化',
                value: 'AGING'
              },
              {
                label: '包装',
                value: 'PACKING'
              },
              {
                label: '组装',
                value: 'ASSEMBLY'
              },
              {
                label: '上料',
                value: 'FEEDING'
              }
            ]
          },
          {
            label: '过站时间',
            prop: 'passedDateTime'
          },
          {
            label: '过站载具',
            prop: 'carrierSn'
          },
          {
            label: '过站次数',
            prop: 'passedNumber'
          },
          {
            label: '操作人员',
            prop: 'operatorName'
          },
          {
            label: '过站结果',
            prop: 'passedResult'
          },
          {
            label: '是否跳站',
            prop: 'isSkip'
          },
          {
            label: '是否对接设备',
            prop: 'isAutoPassed'
          },
          {
            label: '车间',
            prop: 'workshopName'
          },
          {
            label: '产线',
            prop: 'productionLineName'
          },
          {
            label: '工位',
            prop: 'workStationName'
          },
          {
            label: '设备',
            prop: 'equipmentName'
          }
        ]
      },
      //扣料信息表格配置
      buckleMaterialInfoOption: {
        height: 500,
        calcHeight: 30,
        border: true,
        index: true,
        selection: false,
        addBtn: false,
        refreshBtn: false,
        columnBtn: false,
        indexLabel: '序号',
        menu: false,
        column: [
          {
            label: '序列号',
            prop: 'sequenceNumber'
          },
          // {
          //     label: '产品数量',
          //     prop: 'quantity'
          // },
          // {
          //     label: '过站载具',
          //     prop: 'carrierSn'
          // },
          {
            label: '扣料工序',
            prop: 'processRouteName'
          },
          {
            label: '扣料数量',
            prop: 'usageQuantity'
          },
          {
            label: '扣料时间',
            prop: 'usageDateTime'
          },
          {
            label: '作业人员',
            prop: 'operatorName'
          },
          {
            label: '包装条码',
            prop: 'packNo'
          },
          {
            label: '包装数量',
            prop: 'packQuantity'
          },
          {
            label: '物料编码',
            prop: 'materialNo'
          },
          {
            label: '物料名称',
            prop: 'materialName'
          },
          {
            label: '物料批次',
            prop: 'materialBatchNo'
          },
          {
            label: '供应商名称',
            prop: 'supplierName'
          }
        ]
      },
      //SMT扣料信息表格配置
      SMTbuckleMaterialInfoOption: {
        height: 500,
        calcHeight: 30,
        border: true,
        index: true,
        selection: false,
        addBtn: false,
        refreshBtn: false,
        columnBtn: false,
        indexLabel: '序号',
        menu: false,
        column: [
          {
            label: '序列号',
            prop: 'sequenceNumber'
          },
          // {
          //     label: '产品数量',
          //     prop: 'quantity'
          // },
          // {
          //     label: '过站载具',
          //     prop: 'carrierSn'
          // },
          {
            label: '站号',
            prop: 'trackNo'
          },
          {
            label: '扣料数量',
            prop: 'usageQuantity'
          },
          {
            label: '扣料时间',
            prop: 'usageDateTime'
          },
          {
            label: '包装条码',
            prop: 'packNo'
          },
          {
            label: '包装数量',
            prop: 'packQuantity'
          },
          {
            label: '物料编码',
            prop: 'materialNo'
          },
          {
            label: '物料名称',
            prop: 'materialName'
          },
          {
            label: '物料批次',
            prop: 'materialBatchNo'
          },
          {
            label: '供应商名称',
            prop: 'supplierName'
          },
          {
            label: '飞达',
            prop: 'feederCode'
          },
          {
            label: '飞达车',
            prop: 'feederBusCode'
          },
          {
            label: '机台号',
            prop: 'machineCode'
          },
          {
            label: '站位表',
            prop: 'tableCode'
          },
          {
            label: '工单号',
            prop: 'workOrderNo'
          }
        ]
      },
      //不良信息表格配置
      badInfoOption: {
        height: 500,
        calcHeight: 30,
        border: true,
        index: true,
        selection: false,
        addBtn: false,
        refreshBtn: false,
        columnBtn: false,
        indexLabel: '序号',
        menu: false,
        column: [
          {
            label: '序列号',
            prop: 'sequenceNumber'
          },
          // {
          //   label: '状态',
          //   prop: 'status',
          //   formatter: (val) => {
          //     const statusMap = {
          //       1: '待不良确认',
          //       2: '待维修',
          //       3: '待报废',
          //       4: '不良解除',
          //       6: '进维修',
          //       7: '维修中',
          //       8: '维修结束',
          //       9: '出维修',
          //       10: '报废待入库',
          //       11: '报废入库'
          //     };
          //     return statusMap[val.status] || '';
          //   }
          // },
          {
            label: '状态',
            prop: 'results'
          },
          // {
          //   label: '不良次数',
          //   prop: 'processingTimes'
          // },
          {
            label: '不良生产工序',
            prop: 'processRouteName'
          },
          {
            label: '不良代码',
            prop: 'defectiveCode'
          },
          {
            label: '不良现象描述',
            prop: 'phenomenonDescription'
          },
          {
            label: '不良登记人员',
            prop: 'registrant'
          },
          {
            label: '不良登记时间',
            prop: 'registrationTime'
          },
          {
            label: '不良确认结果',
            prop: 'confirmationResults'
          },
          {
            label: '不良确认人员',
            prop: 'confirmedBy'
          },
          {
            label: '不良确认时间',
            prop: 'createTime'
          },
          {
            label: '不良原因大类',
            prop: 'reason'
          },
          {
            label: '不良原因小类',
            prop: 'subReason'
          }
        ]
      },
      //维修信息表格配置
      repairInfoOption: {
        height: 500,
        calcHeight: 30,
        border: true,
        index: true,
        selection: false,
        addBtn: false,
        refreshBtn: false,
        columnBtn: false,
        indexLabel: '序号',
        menu: false,
        labelWidth: 130,
        viewBtn: true,
        editBtn: false,
        delBtn: false,
        viewBtnText: '详情',
        menuWidth: 100,
        column: [
          {
            label: '工单号',
            prop: 'workOrderNo',
            hide: true
          },
          // {
          //   label: '状态',
          //   prop: 'status',
          //   formatter: (val) => {
          //     const statusMap = {
          //       1: '待不良确认',
          //       2: '待维修',
          //       3: '待报废',
          //       4: '不良解除',
          //       6: '进维修',
          //       7: '维修中',
          //       8: '维修结束',
          //       9: '出维修',
          //       10: '报废待入库',
          //       11: '报废入库'
          //     };
          //     return statusMap[val.status] || '';
          //   }
          // },
          // {
          //   label: '状态',
          //   prop: 'results'
          // },
          {
            label: '车间',
            prop: 'workshopName',
            hide: true
          },
          {
            label: '产线',
            prop: 'lineName',
            hide: true
          },
          {
            label: '产品名称',
            prop: 'partName',
            hide: true
          },
          {
            label: '产品编码',
            prop: 'partNo',
            hide: true
          },
          {
            label: '产品型号',
            prop: 'partModel',
            hide: true
          },
          {
            label: '序列号',
            prop: 'sequenceNumber'
          },
          {
            label: '条码类型',
            prop: 'objectType',
            type: 'select',
            hide: true,
            dicData: [
              {
                label: '序列号',
                value: 'PRODUCT'
              },
              {
                label: '载具',
                value: 'CARRIER'
              },
              {
                label: '包装条码',
                value: 'PACKING'
              }
            ]
          },
          {
            label: '产品数量',
            prop: 'quantity',
            hide: true
          },
          {
            label: '不良来源',
            prop: 'failureSource',
            hide: true
          },
          {
            label: '当前所处工序',
            prop: 'currentRouteName',
            hide: true
          },
          {
            label: '不良产生工序',
            prop: 'fromRouteName',
            hide: true
          },
          {
            label: '不良代码',
            prop: 'failureCode',
            hide: true
          },
          {
            label: '不良现象描述',
            prop: 'failureName',
            hide: true
          },
          {
            label: '不良登记人员',
            prop: 'registryByName',
            hide: true
          },
          {
            label: '不良登记时间',
            prop: 'registryDate',
            hide: true
          },
          {
            label: '不良原因大类',
            prop: 'mainCauseName',
            hide: true
          },
          {
            label: '不良原因小类',
            prop: 'subCauseName',
            hide: true
          },
          {
            label: '维修次数',
            prop: 'repairTimes',
            viewDisplay: false
          },
          {
            label: '不良产生工序',
            prop: 'processRouteName',
            viewDisplay: false
          },
          {
            label: '不良确认人员',
            prop: 'createByName',
            hide: true
          },
          {
            label: '不良确认时间',
            prop: 'createTime',
            hide: true
          },
          {
            label: '不良确认结果',
            prop: 'handlingResult',
            hide: true,
            type: 'select',
            dicData: [
              {
                label: '产品维修',
                value: 'REPAIR'
              },
              {
                label: '产品报废',
                value: 'SCRAP'
              },
              {
                label: '解除不良',
                value: 'RELIEVE'
              }
            ]
          },
          {
            label: '进维修时间',
            prop: 'repairInTime',
            hide: true
          },
          {
            label: '维修执行人员',
            prop: 'repairByName',
            hide: true
          },
          {
            label: '进维修类型',
            prop: 'incomingType',
            viewDisplay: false
          },
          {
            label: '进维修时间',
            prop: 'incomingTime',
            viewDisplay: false
          },
          {
            label: '维修执行人员',
            prop: 'maintainer',
            viewDisplay: false
          },
          {
            label: '维修代码',
            prop: 'repairCode'
          },
          {
            label: '维修完成时间',
            prop: 'completeTime',
            viewDisplay: false
          },
          {
            label: '维修结果',
            prop: 'results',
            viewDisplay: false
          },
          {
            label: '维修完成时间',
            prop: 'repairEndTime',
            hide: true
          },
          {
            label: '维修确认结果',
            prop: 'repairHandlingResult',
            hide: true,
            row: true,
            type: 'select',
            dicData: [
              {
                label: '重新维修',
                value: 'REMRO'
              },
              {
                label: '维修成功',
                value: 'SUCCESS'
              },
              {
                label: '维修报废',
                value: 'SCRAP'
              }
            ]
          },
          {
            label: '维修图片',
            prop: 'attachments',
            hide: true,
            span: 24,
            formslot: true
          }
        ]
      },
      scrapInfoOption: {
        height: 500,
        calcHeight: 30,
        border: true,
        index: true,
        selection: false,
        addBtn: false,
        refreshBtn: false,
        columnBtn: false,
        indexLabel: '序号',
        menu: true,
        editBtn: false,
        delBtn: false,
        menuWidth: 100,
        labelWidth: 200,
        column: [
          {
            label: '序列号',
            prop: 'sequenceNumber'
          },
          {
            label: '报废单号',
            prop: 'docNo'
          },
          {
            label: '报废类型',
            prop: 'scrapType',
            html: true,
            formatter: (val) => {
              if (val.scrapType === 'PRODUCT') {
                return '产品报废';
              } else {
                return '维修报废';
              }
            }
          },
          {
            label: '报废确认时间',
            prop: 'scrapTime'
          },
          {
            label: '报废确认人员',
            prop: 'scrapperName'
          }
        ]
      },
      inspcetInfoOption: {
        tip: true,
        searchShow: false,
        border: true,
        index: true,
        indexLabel: '序号',
        dialogClickModal: false,
        // labelWidth: 120,
        // searchSpan: 6,
        addBtn: false,
        // 操作栏不展示
        menu: true,
        editBtn: false,
        delBtn: false,
        // 查看
        viewBtn: false,
        column: [
          {
            label: '类型',
            prop: 'documentType'
          },
          {
            label: '检验单号',
            prop: 'documentNo'
          },
          {
            label: '工单号',
            prop: 'sourceNo'
          },
          {
            label: '销售订单号',
            prop: 'salesOrderNo'
          },
          {
            label: '产品编码',
            prop: 'partNo'
          },
          // {
          //   label: '产品名称',
          //   prop: 'partName'
          // },
          // {
          //   label: '产品规格',
          //   prop: 'partModel'
          // },
          {
            label: '报检数量',
            prop: 'sendExamineQuantity'
          },
          {
            label: '检验数量',
            prop: 'examineQuantity'
          },
          // {
          //   label: '合格数量',
          //   prop: 'okQuantity'
          // },
          {
            label: '不合格数量',
            prop: 'ngQuantity'
          },
          {
            label: '检验结果',
            prop: 'examineResult'
          },
          {
            label: '检验日期',
            prop: 'examineDate'
          }
          // {
          //   label: '检验人员',
          //   prop: 'examineByName'
          // }
        ]
      },
      deliverGoodsInfoOption: {
        height: 500,
        calcHeight: 30,
        border: true,
        index: true,
        selection: false,
        addBtn: false,
        refreshBtn: false,
        columnBtn: false,
        indexLabel: '序号',
        editBtn: false,
        delBtn: false,
        menu: true,
        menuWidth: 100,
        column: [
          {
            label: '发货单号',
            prop: 'no'
          },
          {
            label: '包装条码',
            prop: 'packNo'
          },
          {
            label: '包装数量',
            prop: 'packQuantity'
          },
          {
            label: '产品编码',
            prop: 'productNo'
          },
          {
            label: '产品名称',
            prop: 'productName'
          },
          {
            label: '产品型号',
            prop: 'productModel'
          },
          {
            label: '客户名称',
            prop: 'partner'
          },
          {
            label: '发货人员',
            prop: 'consignor'
          },
          {
            label: '发货时间',
            prop: 'deliveryTime'
          }
        ]
      },
      //发货信息详情
      deliverGoodsInfoDetailOption: {
        submitBtn: false,
        emptyBtn: false,
        labelWidth: 100,
        column: [
          {
            label: '发货单号',
            prop: 'no',
            disabled: false
          },
          {
            label: '客户名称',
            prop: 'partner',
            disabled: false
          },
          {
            label: '发货人员',
            prop: 'consignor',
            disabled: false
          },
          {
            label: '发货时间',
            prop: 'deliveryTime',
            disabled: false
          }
        ]
      },
      //发货详情表格配置
      deliverGoodsListOption: {
        height: 500,
        calcHeight: 30,
        border: true,
        index: true,
        selection: false,
        addBtn: false,
        refreshBtn: false,
        columnBtn: false,
        indexLabel: '序号',
        menu: false,
        column: [
          {
            label: '产品编码',
            prop: 'productNo'
          },
          {
            label: '产品名称',
            prop: 'productName'
          },
          {
            label: '产品规格',
            prop: 'productModel'
          },
          {
            label: '客户料号',
            prop: 'partner'
          },
          {
            label: '单位',
            prop: 'uom'
          },
          {
            label: '需求数量',
            prop: 'requiredQuantity'
          },
          {
            label: '已出库数量',
            prop: 'issuedQuantity'
          },
          {
            label: '备注',
            prop: 'remark'
          }
        ]
      }
    };
  },
  methods: {}
};

export default mixinForwardTraceBackTo;
